package net.dengzixu.java.homework.period7;

/**
 * @author Deng Zixu <admin@dengzixu.com>
 */
public class Period7Homework3 {
    public static void main(String[] args) {
        for (int i = 1; i <= 10; i++) {
            long factorialResult = 1;
            for (int j = 1; j <= i; j++) {
                factorialResult *= j;
            }
//            System.out.println(i + "! = " + factorialResult);
            System.out.printf("%d! = %d \n", i, factorialResult);
        }
    }
}
